<template>
<div>
  <el-container>
    <el-header>
      <!--导航菜单-->
      <el-menu :default-active="activeIndex" class="el-menu-demo" mode="horizontal" @select="handleSelect">
        <el-menu-item index="/success/index">主页</el-menu-item>
        <el-menu-item index="/success/user_List">用户管理</el-menu-item>
      </el-menu>
    </el-header>
    <el-main>
      <router-view></router-view>
    </el-main>
  </el-container>
</div>
</template>

<script>
export default {
  name: "Success",
  data() {
    return {
      activeIndex: this.$route.path,
    };
  },
  methods: {
    handleSelect(key, keyPath) {
      this.$router.push(key);
    }
  },
  created() {
    this.$router.push('/success/index')
  }
}
</script>

<style scoped>

</style>
